<div class="box-tools" style="top:10px;">
    <form class="form-inline" id="project—form" action="{:url('ProjectSide/DivideMoney')}" method="GET" pjax-search="">
        <div class="form-group">
            <label for="company_name">项目方</label>
            <input type="text" name="company_name" id="company_name" class="form-control" style="border-radius:3px;"
                   value="{:input('get.company_name')}" />
        </div>
        <div class="form-group">
            <label for="project_name">项目名称</label>
            <input type="text" name="project_name" id="project_name" class="form-control" style="border-radius:3px;"
                   value="{:input('get.project_name')}" />
        </div>
        <div class="form-group">
            <label for="status">状态</label>
            <select class="form-control" id="status" name="status" style="border-radius:3px;">
                <option value="0">全部</option>
                <option value="1" {if condition="$status eq 1" }selected="selected" {/if} >待审核</option>
                <option value="2" {if condition="$status eq 2" }selected="selected" {/if} >已通过</option>
                <option value="3" {if condition="$status eq 2" }selected="selected" {/if} >已拒绝</option>
            </select>
        </div>

        <div class="form-group">
            <button type="submit" class="btn btn-primary">搜索</button>
            <button type="button" id="dwonload" class="btn btn-primary">下载</button>
            <button type="button" class="btn btn-primary" onclick="resetForm()">重置</button>
        </div>
    </form>
</div>
<script>
    $(function () {
        $('#dwonload').click(function () {
             var url = "{:url('ProjectSide/DivideMoney')}";
             var project_name = $("input[name='project_name']").val();
             var status = $("select[name='status']").val();
             var company_name = $("input[name='company_name']").val();
             location.href = url + "?project_name=" + project_name + "&status=" + status + "&company_name=" + company_name + "&down=1";
        })
    })
    function resetForm() {
        $('select[name="status"]').val('0')
        $('input[name="company_name"]').val('')
        $('input[name="project_name"]').val('')
        $('#project—form').submit()
    }
</script>
